////////////////////////////////////////////////////////////////////////////////

#ifndef _COMMONTYPES_H_
#define _COMMONTYPES_H_

////////////////////////////////////////////////////////////////////////////////

#include <utility>
#include <vector>

////////////////////////////////////////////////////////////////////////////////

/** Shoot the music namespace */
namespace STM
{
    /** Client events */
    enum Event
    {
        INVALID,

        W_DOWN,          // "W" button pressed
        W_UP,            // "W" button released
        S_DOWN,
        S_UP,
        A_DOWN,
        A_UP,
        D_DOWN,
        D_UP,
        MOUSE1_DOWN,
        MOUSE1_UP
    };


    /** Keyboard and mouse key flags */
    enum KeyFlags
    {
        W_KEY  = 0x1,
        A_KEY  = 0x2,
        D_KEY  = 0x4,
        S_KEY  = 0x8,
        MOUSE1 = 0x10
    };


    /** Utility type: position of object (x and y coordinates) */
    typedef std::pair<double, double> Position;


    /** Utility type: positions of objects (x and y coordinates) */
    typedef std::vector<Position> Positions;


    /** Utility type: position of object on screen (x and y coordinates) */
    typedef std::pair<unsigned short, unsigned short> ScrPosition;


    /** Utility type: positions of objects on screen (x and y coordinates) */
    typedef std::vector<ScrPosition> ScrPositions;


    /** Utility type: size of object (height and width) */
    typedef std::pair<double, double> Size;


    /** Utility type: velocity of object (vertical, horizontal)
    The value of velocity is [Pixels per frame]
    Velocity can be positive (down, right), negative (up, left), zero(stay)
    */
    typedef std::pair<double, double> Velocity;
}


////////////////////////////////////////////////////////////////////////////////

#endif

////////////////////////////////////////////////////////////////////////////////
